package com.xp.dto.flow;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.util.List;

/**
 * 流程定义请求DTO
 * 
 * @author xp
 * @since 2025-01-01
 */
@Data
@Schema(description = "流程定义请求DTO")
public class FlowDefinitionRequest {

    @NotBlank(message = "流程编码不能为空")
    @Schema(description = "流程编码", required = true, example = "user_register_flow")
    private String flowCode;

    @NotBlank(message = "流程名称不能为空")
    @Schema(description = "流程名称", required = true, example = "用户注册流程")
    private String flowName;

    @Schema(description = "流程描述", example = "处理用户注册的完整流程")
    private String flowDesc;

    @Schema(description = "流程分类", example = "用户管理")
    private String category;

    @Schema(description = "标签列表", example = "[\"用户\", \"注册\", \"验证\"]")
    private List<String> tags;

    @Schema(description = "流程图数据（JSON字符串）")
    private String flowData;

    @Schema(description = "LiteFlow EL表达式配置", example = "THEN(validateUser, createUser, sendNotification);")
    private String liteflowConfig;

    @NotBlank(message = "版本号不能为空")
    @Schema(description = "版本号", required = true, example = "1.0.0")
    private String version;

    @Schema(description = "超时时间（秒）", example = "300")
    private Integer timeout;

    @Schema(description = "重试次数", example = "3")
    private Integer retryCount;

    @Schema(description = "错误处理策略", example = "FAIL")
    private String errorStrategy;

    @Schema(description = "LiteFlow应用名称", example = "ai-boke-flow")
    private String applicationName;
}